/**
 * 
 */
package org.istt.service.impl;

import org.istt.dao.DepartmentDao;
import org.istt.domain.Department;
import org.istt.service.DepartmentManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Huy
 *
 */
@Service("departmentManager")
public class DepartmentManagerImpl extends ManagerImpl<Department, Long> implements DepartmentManager {
	
	/**
	 * @param WorkflowDao the WorkflowDao to set
	 */
	@Autowired
	public void setDepartmentDao(DepartmentDao dao) {
		this.dao = dao;
	}
	
	@Override
	public boolean isUnique(String name, Long id) {
		
		return ((DepartmentDao)dao).isUnique(new String[]{"name"}, new String[]{name}, id);
	}	

}
